package com.woniuxy.project115.kaer.commons.exception;

import com.woniuxy.project115.kaer.commons.util.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class HandlerExceptionGlobal {
    @ExceptionHandler(Exception.class)
    public Result<String> handlerException(Exception e){
        e.printStackTrace();
        return  Result.failed(e.getMessage());
    }
}
